package org.hqs.feign.clients;

import org.hqs.feign.common.JsonResult;
import org.hqs.feign.pojo.Patient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "patientservice")
public interface PatientClient {
    @GetMapping("/patient/{orderId}")
    public JsonResult< Patient> queryById(@PathVariable("orderId") Long orderId);

    @GetMapping("/patient/findAll")
    public JsonResult<List<Patient>> findAllPatients();

    @PostMapping("/patient/add")
    public JsonResult addPatient(@RequestBody Patient patient);

    @PutMapping("/patient/update")
    public JsonResult updatePatient(@RequestBody Patient patient);

    @DeleteMapping("/patient/delete")
    public JsonResult deletePatient(@RequestBody Patient patient);
}
